<template>
  <div class="Header">
    <van-sticky  sticky>
      <div class="header">
        <van-row>
          <van-col span="8" @click="tomy()">
            <span class="my">
              <van-icon name="contact" size="25" color="#fff" />
            </span>
          </van-col>
          <van-col span="8">
            <div class="logo"></div>
          </van-col>
          <van-col span="8">
            <span class="sch" @click="serchs">
              <van-icon name="search" size="25" color="#fff" />
            </span>
          </van-col>
        </van-row>
      </div>
    </van-sticky>
  </div>
</template>

<script>
export default {
  name: "Header",
  props: {
    msg: String,
  },
  props: {
    title: { type: String, default: "" },
    hasBack: { type: Boolean, default: false },
    hasClose: { type: Boolean, default: false },
  },
  methods: {
    serchs() {
      this.$router.push("/Search");
    },
    tomy(){
      this.$router.push("/Home");
    }
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="stylus">

.header {
  width: 100%;
  height: 1.25rem;
  background-color: rgb(96, 207, 235);
  line-height: 1.25rem;
  position: absolute;
  text-align: center;
}

.logo {
  margin: 0 auto;
  width: 3.11111111rem;
  height: 1.25rem;
  background: url('/bimg/ttk.png') no-repeat 56% 52%;
  background-size: 160%;
}

.my, .sch {
  position: relative;
  top: 0.25rem;
}

.my {
  left: -0.5rem;
}

.sch {
  right: -0.5rem;
}
</style>